package com.gomcarter.frameworks.fsm.injector;

import com.baomidou.mybatisplus.core.injector.AbstractMethod;
import com.baomidou.mybatisplus.core.injector.DefaultSqlInjector;
import com.baomidou.mybatisplus.core.metadata.TableInfo;
import com.gomcarter.frameworks.fsm.injector.method.FsmUpdateStateUpdater;

import java.util.List;

/**
 * fsm sqlTemplate 定制注入器
 *
 * @author 李银 2020年03月17日17:17:33
 * @deprecated 停止使用yfcloud-base-starter-fsm，推荐使用yfcloud-controller-starter-statemachine
 */
public class FsmSqlInjector extends DefaultSqlInjector {

    @Override
    public List<AbstractMethod> getMethodList(Class<?> mapperClass, TableInfo tableInfo) {
        List<AbstractMethod> methods = super.getMethodList(mapperClass, tableInfo);
        methods.add(new FsmUpdateStateUpdater());
        return methods;
    }
}
